import axios from 'axios';

export function getDeliveryPlacePage(params: any) {
  return axios.get('/mall/deliveryplace/page', { params });
}

export function getDeliveryPlaceList(): Promise<any[]> {
  return axios.get('/mall/deliveryplace/list');
}

export function addDeliveryPlace(data: any) {
  return axios.post('/mall/deliveryplace', data);
}

export function updateDeliveryPlace(data: any) {
  return axios.put('/mall/deliveryplace', data);
}

/**
 *  注意：这里是反单引号`
 */
export function deleteDeliveryPlace(id: string) {
  return axios.delete(`/mall/deliveryplace/${id}`);
}
